package com.catering.controller;

import com.catering.pojo.Dish;
import com.catering.pojo.Employee;
import com.catering.pojo.VO.Pages;
import com.catering.pojo.VO.Result;
import com.catering.service.DishService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("dish")
public class DishController {
    @Resource
    private DishService dishService;
    //分页查询所有菜品
    @RequestMapping("findAllDish")
    public Result findAllDish(@RequestBody Pages pages){
        PageInfo<Dish>pageInfo=dishService.showPage(pages);
        return Result.OK("分页查询成功",pageInfo);
    }



}
